package com.gl.glgateway.utils;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @desc   使用token验证用户是否登录
 * @author lpf
 **/
public class TokenUtil {
    //设置30分钟过期
    private static final long EXPIRE_DATE=30*60*1000;
    //token秘钥
    private static final String TOKEN_SECRET = "EIMEIMEIM";
    private static Logger logger = LogManager.getLogger(TokenUtil.class);

    public static final String REDIS_TOKEN="_token";

    public static final String REDIS_JSAPI="_jsapi";

    public static String getToken (String username,String password){

        String token = "";
        try {

        }catch (Exception e){
            e.printStackTrace();
            return  null;
        }
        return token;
    }

    public static boolean verify(String token){
        /**
         * @desc   验证token，通过返回true
         * @params [token]需要校验的串
         **/
        try {

            return true;
        }catch (Exception e){
            e.printStackTrace();
            return  false;
        }
    }

}

